Malware comes in several different types, including viruses, worms, Trojan horses, ransomware, logic bombs, rootkits, backdoors, trapdoors, and wormholes.

Viruses

A virus is a self-replicating piece of code that spreads without the consent of a user but frequently with their assistance, as a user must click on a link or open a file.

A virus infects the host system. Many virus infections can cause extensive damage, while others are humorous or just for fun. A virus will often infect other programs and spread to other systems.

A virus is often constructed of several parts: the infection mechanism that searches for new victims or programs to infect, the trigger that launches (activates) the virus, and the payload that executes the intended purpose of the virus. A virus also does the following:

Examples of well-known viruses are Stoned and Melissa.

Worms

A worm is another form of malware, and although similar, it is not the same as a virus. It will self-replicate and usually spreads through a vulnerability in a system, but unlike a virus, it does not infect a host or program. A worm can do the following:

Examples of well-known worms include Kournikova, SQL Slammer, ILOVEYOU, and MSBlast.

Trojan Horses

A Trojan horse is a type of malware (usually a virus) that deceives the victim, like the story of the ancient Greeks presenting the city of Troy with a giant wooden horse that, unbeknownst to the Trojans, contained soldiers hidden inside.

The Trojan horse exploit is commonly based on social engineering, where the victim is manipulated to do something they should not have done.

Trojan horse malware appears to be innocent and useful, but it has malicious content hidden inside. For example, a user may download a game or picture without realizing the game contains code that will compromise their system, perhaps stealing data or installing a keystroke logger to record all keyboard entries from the user, which would include passwords, account numbers, and other information. The following is also true about a Trojan horse:

Examples of well-known Trojan horse malware include Back Orifice, NetBus, and Whack-a-Mole.

Ransomware

Ransomware is one of the most common malware attacks in use today. Ransomware will take over a victim’s machine, encrypt their files, and only allow the victim to regain access if they pay a ransom to the attacker.

A well-known example of ransomware is WannaCry. Others include CryptoLocker, CryptoWall, Crysis, CTB-Locker, GoldenEye, Jigsaw, and KeRanger.

Since 2019, many more strains of ransomware have been being produced and weaponized by organized, advanced persistent threat teams and their support organizations. Weaponization includes packaging all the elements that a sophisticated, enduring, and effective attack would need into a bundle along with the operational procedures and support capabilities. For example, some ransomware attackers actually use call centers (via chat platforms) to guide their victims through the recovery process.

Logic Bombs

Logic bombs are malware that will trigger their payload on a specified date or action. (The trigger in a virus is a type of logic bomb.) Examples of logic bombs have included several attacks by disgruntled ex-employees that installed code on their organizations’ systems to do serious damage to their systems and data if the former employee’s name was no longer on the payroll.

A well-known example of a logic bomb is Michelangelo.

Droppers

Dropper is a malicious file used to install malicious code on a computer. Downloader Trojans are sometimes also called droppers.

Keyloggers

A keylogger is a type of Trojan used to capture data keyed on a system. It may also include sophisticated Trojans that can capture all keystrokes and take pictures of the screen at specific points in time to steal online credentials and other sensitive information. It may also refer to physical keylogger devices that can be placed in line between keyboards and a computer to steal sensitive information.

File Infectors

File infector is mostly a historical term that generally refers to viruses that infect files. Perhaps the best-known historical file-infecting virus is Jerusalem, which infects all executable files run except for command.com in denial of service (DoS).

File-infecting viruses may prepend code to the front of the file, append code to the end of the file or creatively inject into various locations of the file. File-infecting viruses that inject into various locations of the body are also known as cavity viruses, such as the infamous Elkern. Removal of such code can be quite difficult, and multiple file infections often corrupt files beyond repair.

Modern-day file-infecting viruses are rare but are sometimes included with blended threats that install Trojans, spreading as worms across the network and infecting specific file types of interest on the host, such as EXE or web content such as HTML pages with script injects.

Macro viruses first emerged with Concept in 1995, spreading within Microsoft Office software. They are created within Visual Basic for Applications or WordBasic and spread through Office documents such as .doc files. Macro viruses spread for several years until changes in technology and security responses to the threat, in addition to a competitive criminal marketplace with Trojans and bots, essentially removed them as a prevalent threat shortly after the turn of the 21st century.

Boot Sector Virus

Boot sector virus is malware that spreads by copying itself to the master boot record (MBR) of a hard disk and boot sectors of floppy disks.

Brain, the first PC virus, is a boot sector virus. Other notable examples include Form, Joshi, and AntiCMOS. In 2007, a new threat emerged against the MBR called Mebroot, which modified the MBR of hard disks and installed into the slack space (unused space at the end of a drive) to load a kernel-level rootkit before the operating system booted up. It is possible that such stealthy code would then be installed in available memory on hardware, pushing the boundaries of software-based threats on hardware loading before the operating system. Removal of such threats required that the MBR be overwritten with new data in addition to reimaging or reinstalling of the operating system.

Zombies

Zombies are computers that are controlled and can execute commands when instructed by a third party. Such victim computers may have been infected with a program that allows remote manipulation of the victim. This may allow the person controlling the zombie to use it to send spam, launch a denial-of-service attack or participate in some other unauthorized activity. When several infected machines are combined into a single network, this is known as a robotically controlled network or botnet.

Botnets

Botnets may include thousands of compromised machines that are under the control of a “bot herder” that can manage and manipulate the machines to execute attacks.

Modern botnets may include many devices besides traditional computers including networking devices (e.g., wireless home routers), IP cameras, or any other Internet of Things (IoT) device that has network access and is insecurely installed. Botnets have been used to launch massive, distributed denial-of-service (DDoS) attacks that can take the website of an organization, a government agency, or even an entire country out of service.

Spyware

Spyware is code written to steal information from a victim. The victim may lose banking data, passwords or other confidential information due to spyware. Spyware comes in several forms such as a keystroke logger that captures each keystroke as the victim enters it (gleaning passwords), screen scrapes that record the data on the user’s screen, and software that enables the victim’s computer camera to take pictures or video footage of the victim without the victim’s knowledge.